//
//  StatusFrame.m
//  CC
//
//  Created by Calvin on 5/18/15.
//  Copyright (c) 2015 Calvin. All rights reserved.
//

#import "StatusFrame.h"
#import "StatusDetailFrame.h"

@implementation StatusFrame
-(void)setStatus:(StatusModel *)status
{
    _status =status;
    [self setupStatusDetailFrame];
    [self setupToolbarFrame];
    self.cellHeight=CGRectGetMaxY(self.toolBarFrame);
}

-(void)setupStatusDetailFrame
{
    StatusDetailFrame *detailFrame =[[StatusDetailFrame alloc] init];
    detailFrame.status =self.status;
    self.statusDetailFrame =detailFrame;
}

-(void)setupToolbarFrame
{
    CGFloat toolbarX=0;
    CGFloat toolbarW=ScreenW;
    CGFloat toolbarH=35;
    CGFloat toolbarY=CGRectGetMaxY(self.statusDetailFrame.frame);
    self.toolBarFrame=CGRectMake(toolbarX, toolbarY, toolbarW, toolbarH);
}
@end
